{

    const _constructor = function () {
        return {
            data: {
                name : 'content',
                title: '文本域',
                placeholder : '请输入文本',
                value : '',
                rows : 3
            },

            methods: {
                getValue : function () {
                    return this.value;
                },
                
                getField : function () { 
                    return this.name;
                }
            }
        }
    }

    const textarea = {  
        elementTemplate : `
                    <div class="form-group">
                    	<label>{{title}}:</label>
                    	<textarea class="form-control" :rows="rows" :placeholder="placeholder" v-model="value"></textarea>
                    </div>
        `,
        prototypeTemplate : `
                    <div class="form-group">
                        <label >文本域的标题:</label>
                        <input type="text" class="form-control input-sm" v-model="title">
                    </div>
                    <div class="form-group">
                        <label >默认提示文本:</label>
                        <input type="text" class="form-control input-sm" v-model="placeholder">
                    </div>
                    <div class="form-group">
                        <label >默认显示行数:</label>
                        <input type="text" class="form-control input-sm" v-model="rows">
                    </div>
        `,
        _constructor : _constructor 
    }

    if ( window.TEMPLATE && !window.TEMPLATE.textarea ) {
        window.TEMPLATE.textarea = textarea
    }
}